package so.wy.servicecenter.businessbed.manager.fm;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import so.wy.servicecenter.base.frame.manager.AbstractManager;
import so.wy.servicecenter.businessbed.dao.rdb.rent_user.RentUserDAO;
import so.wy.servicecenter.businessbed.dao.rdb.rent_user.RentUserDO;

@Service
@Scope("prototype")
public class RentUserFManager extends AbstractManager {
    @Autowired
    private RentUserDAO rentUserDAO;

    //校验用户对应租户是否存在
    public RentUserDO getRentUser(Long userId) {
        return rentUserDAO.selectOne(new LambdaQueryWrapper<RentUserDO>()
                .eq(RentUserDO::getUserId, userId));
    }

    public RentUserDO getRentUserById(Long rentUserId) {
        return rentUserDAO.selectById(rentUserId);
    }


}
